package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * @Author Justin Parker
 * @Date 2024/8/9 0009 11:54
 * @Version 1.0
 */
@Data
public class UserRegDTO {

//    @NotBlank(message = "用户名不能为空和空字符串和空白串")
//    @Size(min = 6,max = 12,message = "用户名长度必须在6-12之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,7}|[a-zA-Z0-9]{0,14}$",message = "用户名不能超过7个汉字或14个英文字符")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "用户昵称",required = true)
    private String nickname;
    @ApiModelProperty(value = "用户密码",required = true)
    private String password;

}
